package com.smarthome.ipc.command;

import org.springframework.stereotype.Service;

import com.smarthome.domain.ipc.IpcCodeEnum;
import com.smarthome.domain.ipc.IpcConstants;
import com.smarthome.domain.ipc.IpcResponse;
import com.smarthome.domain.ipc.req.HkIpcResidenceDoorOpRequest;
import com.smarthome.domain.ipc.req.HkIpcResidenceTalkDoorRequest;
//import com.smarthome.common.tools.BossCachedKeysUtil;
//import com.smarthome.common.tools.cache.JedisUtils;
import com.smarthome.ipc.hk.HKMainService;

//import com.smarthome.ipc.hk.entity.NetDvrLoginV30Entity;

/**
 * 海康门口机视频历史查看
 * 
 * @author add by denghw 2015/09/26
 *
 */
@Service(IpcConstants.IPC_COMMAND_RESIDENCE_DOOR_VIDEO_HISTORY_HK)
public class HkNetVideoHistoryview extends HKMainService {
	@Override
	protected void doCmd(HkIpcResidenceDoorOpRequest request, IpcResponse<?> response) {
		// TODO Auto-generated method stub
		// 1.获取语言请求对象
		HkIpcResidenceTalkDoorRequest sprequest = (HkIpcResidenceTalkDoorRequest) request;
		// 2.获取唯一的操作句柄
		// NetDvrLoginV30Entity clickObj = (NetDvrLoginV30Entity)
		// JedisUtils.get(BossCachedKeysUtil
		// .getKey(BossCachedKeysUtil.MODULE_HK_TALKDOOR_DEVICE,
		// sprequest.getIp() + sprequest.getDeviceId()));
		if (IpcConstants.IPC_COMMAND_RESIDENCE_DOOR_TALK_HK_START.equals(sprequest.getCommand())) {

		} else if (IpcConstants.IPC_COMMAND_RESIDENCE_DOOR_TALK_HK_STOP.equals(sprequest.getCommand())) {

		} else {
			rtnBackErrMsg(sprequest.getDeviceId(), sprequest.getCommand(), IpcCodeEnum.COMMAND_NOT_FOUND.getCode(),
					IpcCodeEnum.COMMAND_NOT_FOUND.getMsg());
			response.setIpcCodeObj(IpcCodeEnum.COMMAND_NOT_FOUND);
			return;
		}
		// 4.成功
		response.setIpcCodeObj(IpcCodeEnum.SYSTEM_SUCCESS);
	}

}
